package com.camunda.workflow.domain.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.RelationOneToOne;
import com.mybatisflex.annotation.Table;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;
import org.camunda.bpm.engine.impl.persistence.entity.GroupEntity;
import org.camunda.bpm.engine.impl.persistence.entity.UserEntity;

import java.io.Serializable;

@ApiModel
@Data
@Accessors(chain = true)
@Table(value = "sys_user_role")
public class SysUserRole implements Serializable {
    @Id(keyType = KeyType.None)
    private String userId;
    @Id(keyType = KeyType.None)
    private String roleId;

    @RelationOneToOne(selfField = "user_id", targetField = "id", targetTable = "sys_user")
    protected SysUser user;
    @RelationOneToOne(selfField = "role_id", targetField = "id", targetTable = "sys_role")
    protected SysRole role;
}
